package com.zjj.springstu.springHandwriting.framework.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * Bean定义态BeanDefinition建模
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class BeanDefinition {
	/**
	 * beanName
	 */
	private String beanName;

	/**
	 * 对应的类
	 */
	private Class<?> clazz;

	/**
	 * 单例还是原型
	 */
	private ScopeEnum scope;

	/**
	 * 是否懒加载
	 */
	@Builder.Default
	private Boolean isLazy = false;

	public static enum ScopeEnum {
		SINGLETON("singleton"),
		PROTOTYPE("prototype"),

		;

		private String scopeType;

		public String getScopeType() {
			return scopeType;
		}

		public void setScopeType(String scopeType) {
			this.scopeType = scopeType;
		}

		ScopeEnum(String scopeTYpe) {
			this.scopeType = scopeTYpe;
		}
	}

}
